﻿<div>

    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title"> <span class="fa fa-edit"></span>Editar Recurso</h3>
        </div>
        <div class="panel-body">
            <div class="container-fluid">
                <form class="form-horizontal" role="form">
                    <input type="hidden" name="idRecurso" id="idRecurso" value="{{IdRecurso}}" />
                    <br>
                    <div class="form-group" id="nombreGrupo">
                        <label for="nombre" class="col-sm-2 control-label">Nombre:</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="nombre" value="{{Nombre}}" maxlength="60">
                        </div>
                    </div>
                    <div class="form-group" id="codigotipoGrupo">
                        <label for="codigotipo" class="col-sm-2 control-label">Tipo:</label>
                        <div class="col-sm-8">
                            <select name="codigotipo" id="codigotipo" class="form-control">
                                {{#each CatalogosMultimedia}}
                                    <option value="{{ValorCatalogo}}" >{{Descripcion}}</option>
                                {{/each}}
                            </select>
                        </div>
                    </div>

                    <div class="col-sm-offset-3 col-sm-6">{{#if Uri}}
                    <h3>Recurso Existente</h3>
                    {{#if_eq CodigoTipo "IMG"}}
                        <img src="http://localhost/ExcellentProject.Cuestionarios/api/streamming?filename={{Uri}}&ext=jpeg" alt="Ima" style="margin: 0 auto; width: 400px;" />{{/if_eq}}{{#if_eq CodigoTipo "VID"}}
                        <video controls="controls">
                            <source src="http://localhost/ExcellentProject.Cuestionarios/api/streamming?filename={{Uri}}&ext=mp4" type="video/mp4" style="margin: 0 auto; width: 400px;" />
                        </video>{{/if_eq}}{{#if_eq CodigoTipo "SND"}}
                        <audio controls="controls">
                            <source src="http://localhost/ExcellentProject.Cuestionarios/api/streamming?filename={{Uri}}&ext=mp3" type="audio/mp3" style="margin: 0 auto; width: 400px;" />
                        </audio>{{/if_eq}}{{/if}}
                        <input type="hidden" id="urlValue" value="{{Uri}}" />
                    </div>

                    <div class="row-fluid col-sm-offset-3 col-sm-6">
                        <iframe class="container well well-small span6" id="uploadform"
                                style="height: 400px; width:100%; background-color: #f5e5c5;"
                                src="http://localhost/excellentproject/mini-upload-form/index.html"></iframe>
                    </div>
                </form>
            </div>
            <div class="form-group">
                <div class="container-fluid">
                    <div class="col-sm-offset-1 col-sm-8">
                        <a id="guardar" class="btn btn-primary guardar" href="#" style="text-align: right"><i class="fa fa-save"></i>Guardar</a>
                    </div>
                    <div class="col-sm-2">
                        <a id="cancelar" class="btn btn-primary" href="/recursos" style="text-align: left"><i class="icon icon-plus"></i>Cancelar</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>